Skip to content

chore: Log app layout error-boundary catches#4706

Merged
gethinwebster merged 1 commit into
mainfrom
dev-v3-gethinw-applayout-error-logging
Jul 9, 2026
Merged

chore: Log app layout error-boundary catches#4706
gethinwebster merged 1 commit into
mainfrom
dev-v3-gethinw-applayout-error-logging

Conversation

@gethinwebster

Copy link
Copy Markdown
Member

Summary

App layout error boundaries now emit a fixed [AwsUiAppLayoutError] prefix to the console on each catch. This lets the integration/canary tests detect real App Layout breakage by matching the prefix, instead of maintaining an allowlist of every other service's console noise. The prefix is a string literal, so it survives minification.

Testing

Unit tests assert the marker fires per app layout part on a real boundary catch. quick-build, unit suites, and lint all pass.

Emit a fixed [AwsUiAppLayoutError] prefix from the app layout error boundary's onError so integration/canary tests can detect real App Layout breakage by matching the prefix instead of maintaining an allowlist of unrelated console noise. The prefix is a string literal, so it survives minification.
@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.57%. Comparing base (45502c0) to head (f174dbf).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4706   +/-   ##
=======================================
  Coverage   97.57%   97.57%           
=======================================
  Files         948      948           
  Lines       30507    30517   +10     
  Branches    11164    11167    +3     
=======================================
+ Hits        29767    29777   +10     
- Misses        693      733   +40     
+ Partials       47        7   -40     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gethinwebster gethinwebster changed the title feat: log app layout error-boundary catches with a fixed prefix chore: Log app layout error-boundary catches Jul 8, 2026
@gethinwebster gethinwebster marked this pull request as ready for review July 9, 2026 06:08
@gethinwebster gethinwebster requested a review from a team as a code owner July 9, 2026 06:08
@gethinwebster gethinwebster requested review from srungta08 and removed request for a team July 9, 2026 06:08
errorMessage: error?.error?.message ?? '',
appLayoutPart: appLayoutPart ?? '',
});
console.log(`[AwsUiAppLayoutError] appLayoutPart=${appLayoutPart ?? ''}`, error?.error);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not console.error?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the purpose of error boundaries is, at least in part, to allow errors to be caught and handled gracefully. At this point, we don't know whether this error will be caught by a higher-level and handled in some way there or not, so IMO it's better to be rather cautious and use log instead of error here to prevent creating error messages when the error is actually caught and handled gracefully.

@gethinwebster gethinwebster added this pull request to the merge queue Jul 9, 2026
Merged via the queue into main with commit 067bea5 Jul 9, 2026
59 checks passed
@gethinwebster gethinwebster deleted the dev-v3-gethinw-applayout-error-logging branch July 9, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants